package errors

import (
	"fmt"
	"github.com/fatih/color"
)

type InvalidParameterType struct {
	Expected string
	Actual   string
}

func (err InvalidParameterType) Error() string {
	return fmt.Sprintf("Expected param of type %s but got %s", err.Expected, err.Actual)
}

type OutputParsingError struct {
	Module string
	Err    error
}

func (err OutputParsingError) Error() string {
	return fmt.Sprintf("Could not parse output from module %s. Underlying error: %s", color.HiGreenString(err.Module), err.Err)
}
